Skip to content

libs/trystero: hold a second connection for the peer's choice (fixes interop_native room-leave flake) - #45

Merged
pinhopro merged 1 commit into
mainfrom
fix/interop-room-leave
Nov 20, 2026
Merged

pinhopro merged 1 commit into
mainfrom
fix/interop-room-leave

Conversation

@pinhopro

Copy link
Copy Markdown
Contributor

Bumps libs/trystero to webcpporg/trystero#9, which fixes the intermittent interop_native failure "Native C++: one room leaving, either side, leaves the other room and the connection" (CI run 44726002584).

The failure came from two rooms' connections crossing. The native app closed at once the connection the page kept. libdatachannel's stream reset and SHUTDOWN came ahead of its ABORT, so Chrome failed the page's first sends on that connection, and Trystero JS logged a peer error.

trystero now holds such a second connection until the peer shows which one it keeps. The trystero PR has the evidence and the measurements.

This PR also updates CODING-GUIDELINES.md's decision "Adoption follows Trystero" to the new rule, with the reason.

Verified locally on macOS:

  • All 30 interop_native scenarios pass.
  • The scenario passed 1,200 runs of 1,200 in loops.
  • The emscripten interop_browser suite passes, 26 of 26.
  • All trystero tests pass.
  • clang-format is clean.
  • The full tools/lint/lint.sh is clean.

🤖 Generated with Claude Code

…hows which it keeps, which ends interop_native's flaky "one room leaving" (gitlink 8d4df61)

CI run 44726002584 failed "Native C++: one room leaving, either side, leaves the other room and
the connection" with "console.error Trystero peer error: OperationError": two rooms' connections
crossed, the native app closed at once the one the page kept, and libdatachannel's stream reset
and SHUTDOWN ahead of its ABORT let Chrome fail the page's first sends and report the failure.
trystero now holds such a second connection until the peer shows which it keeps (1,800 two-room
meetings: no peer error, against 6 before; the scenario passed 600 runs of 600), and the coding
guidelines' adoption decision says so, with the reason.
@pinhopro
pinhopro merged commit 4c5cfcc into main Nov 20, 2026
13 of 185 checks passed
@pinhopro
pinhopro deleted the fix/interop-room-leave branch November 20, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant